<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>认领超时提醒</title>
	<script src="../../js/header.js"></script>
</head>

<body>
<div v-cloak id="app">
	<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
		<el-row>
			<el-col :span="4" class="tab-title">
				任务超时提醒一览表
			</el-col>
			
		</el-row>
	</div>
	
	<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" ref="multipleTable"
      @selection-change="handleSelectionChange" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
		<el-table-column type="selection" ></el-table-column>
		<el-table-column
				type="index"
				label="序号"
				width="80"
				align="center">
		</el-table-column>
		<el-table-column
				prop="taskno"
				label="任务编码"
				width=""
				align="center">
		</el-table-column>
		<el-table-column
				label="操作"
				width=""
				align="center">
			<template slot-scope="scope">
				<el-button size="mini" @click="view(scope.$index,scope.row)">查看</el-button>
			</template>
		</el-table-column>
	</el-table>
	
	<div style="overflow: hidden;">
		<div class="pagination">
			<el-pagination
					@size-change="handleSizeChange"
					@current-change="handleCurrentChange"
					:current-page="currentPage"
					:page-sizes="[10, 20, 30, 40]"
					:page-size="pagesize"
					background
					layout="total, sizes,prev, pager, next"
					:total="tableTotal"
					prev-text="上一页"
					next-text="下一页">
			</el-pagination>			
		</div>	
	</div>
	<!--查看联合监管任务详情-->
	<el-dialog title="" :visible.sync="viewdetail" center fullscreen>
		<el-form :model="taskInfo" :rules="rules" ref="taskInfo" label-width="160px">
			<el-row>
				<el-col :span="4" class="tab-title">
					任务书信息
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="10">
					<el-form-item label="任务编码:"  prop="taskno">
						<el-input v-model="taskInfo.taskno"  placeholder=""  disabled></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="任务名称:" prop="taskname">
						<el-input v-model="taskInfo.taskname"  placeholder=""  disabled></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="10">
					<el-form-item label="任务发起时间:"  prop="taskstarttime" >
						<el-input v-model="taskInfo.taskstarttime"  placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="发起单位类型:" prop="initiateUnitType">
						<el-select v-model="taskInfo.initiateUnitType" placeholder="请选择"  disabled>
							<el-option label="部门" value="0"></el-option>
							<el-option label="地区" value="1"></el-option>									
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>						
				<el-col :span="10">
					<el-form-item label="发起单位编码:"  prop="initiateunitno">
						<el-input v-model="taskInfo.initiateunitno" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="发起单位名称:"  prop="initiateunitname">
						<el-input v-model="taskInfo.initiateunitname" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>				
			</el-row>
			<el-row>						
				<el-col :span="10">
					<el-form-item label="协办单位类型:"  prop="unionUnitType">
						<el-select v-model="taskInfo.unionUnitType" placeholder="请选择" disabled>
							<el-option label="部门" value="0"></el-option>
							<el-option label="地区" value="1"></el-option>		
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="协办部门编码:"  prop="uniondeptno">
						<el-input v-model="taskInfo.uniondeptno" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>						
				<el-col :span="10">
					<el-form-item label="协办部门名称:"  prop="uniondeptname">
						<el-input v-model="taskInfo.uniondeptname" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="协办地方编码:"  prop="unionAreaNo">
						<el-input v-model="taskInfo.unionAreaNo" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>				
			</el-row>
			<el-row>
				<el-col :span="10">
					<el-form-item label="协办地方名称:" prop="unionAreaName">
						<el-input v-model="taskInfo.unionAreaName" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>

				<el-col :span="10">
					<el-form-item label="监管对象行业类型:"  prop="superviseobjectno">
						<el-input v-model="taskInfo.superviseobjectno"  placeholder=""  disabled></el-input>
					</el-form-item>
				</el-col>
				
			</el-row>

			<el-row>						
				<el-col :span="10">
					<el-form-item label="监管事项类型:"  prop="">						
						<el-checkbox-group v-model="taskInfo.taskJgType" @change="changeValue">
						    <el-checkbox label="0" disabled>行政检查</el-checkbox>
						    <el-checkbox label="1" disabled>行政处罚</el-checkbox>
						    <el-checkbox label="2" disabled>行政强制</el-checkbox>
						    <el-checkbox label="3" disabled>其它</el-checkbox>
						</el-checkbox-group>
					</el-form-item>
				</el-col>
			</el-row>

			<el-row>						
				<el-col :span="20">
					<el-form-item label="主要检查内容:"  prop="">
						<el-input
                                type="textarea"
                                disabled
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                maxlength="500"
                                show-word-limit
                                v-model="taskInfo.inspectcontent">
                       	</el-input>		
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>						
				<el-col :span="20">
					<el-form-item label="检查要求:"  prop="">
						<el-input
                                type="textarea"
                                disabled
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                maxlength="500"
                                show-word-limit
                                v-model="taskInfo.inspectclaim">
                       	</el-input>					
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>						
				<el-col :span="20">
					<el-form-item label="备注:"  prop="">
						<el-input
                                type="textarea"
                                disabled
                                :autosize="{ minRows: 8, maxRows: 8}"
                                placeholder=""
                                maxlength="500"
                                show-word-limit
                                v-model="taskInfo.remark">
                       	</el-input>								
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="10">
					<el-form-item label="任务状态:"  prop="">
						<el-input v-model="taskInfo.taskState" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="10">
					<el-form-item label="任务接收时间:"  prop="receiveTime">
						<el-input v-model="taskInfo.receiveTime" placeholder="" disabled></el-input>
					</el-form-item>
				</el-col>
			</el-row>

			<el-row>
				<el-col :span="22">
					<div style="float:right;">
						<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="viewdetail = false;">关闭</el-button>
					</div>
				</el-col>
			</el-row>
		</el-form>
	</el-dialog>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            return {
                uuid:'',
                link:'',//iframe链接
                link2:'',//iframe链接
                viewdetail:false,
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                tableTotal:'',
                tableData: '',
                multipleTable: [],  //存放选中值的数组  
                taskInfo : {
                    id : '',
                    taskno : '',
                    taskname : '',
                    taskstarttime : '',
					status : '',
					initiateunitno : '',
					initiateunitname : '',
					initiateUnitType : '',
					unionUnitType : '',						
                    uniondeptno : '',
                    uniondeptname : '',
                    unionAreaNo : '',
                    unionAreaName : '',
                    taskJgType : '',
                    superviseobjectno : '',
                    inspectcontent : '',
                    inspectclaim : '',
                    remark : '',
                    receiveTime:'',
                    fbTime:'',
                    endTime:'',
                    fkTime:'', 
				},
				rules: {
                    taskno : [{
                        required : true,
						message : '任务编码必填',
						trigger : 'blur'
					}],
					taskname : [{
                        required : true,
						message : '任务名称必填',
						trigger : 'blur'
					}],
                    taskstarttime : [{
                        required : true,
						message : '任务发起时间必填',
						trigger : 'blur'
					}],
                    initiateUnitNo : [{
                        required : true,
						message : '发起单位编码必填',
						trigger : 'blur'
					}],
                    initiateUnitName : [{
                        required : true,
						message : '发起单位名称必填',
						trigger : 'blur'
					}],
                    initiateUnitType : [{
                        required : true,
						message : '发起单位类型必填',
						trigger : 'blur'
					}],
                    initiateunitno : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    initiateunitname : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    unionUnitType : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    uniondeptno : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    uniondeptname : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    unionAreaNo : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    unionAreaName : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    superviseobjectno : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],
                    receiveTime : [{
                        required : true,
						message : '必填',
						trigger : 'blur'
					}],                   
                },
            }
        },
        created(){
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            var userRole = userInfo.orgName;
            
        },
        mounted(){
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                axios({
                    method: 'get',
                    url: '/dzjzfjg/lhjgrwbl/queryOvertime',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno                       
                    }
                })
				.then(response => {
					console.log(response)
					if (response.data.code == 200) {
						this.tableData = response.data.data.results;
						this.tableTotal = response.data.data.total;// 数据长度

					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
           	},
            handleChange(value) {
                console.log(value);
            },
            handleSelectionChange(val) {
      			this.multipleTable = val;               //  this.multipleTable 选中的值
		      	console.log(val);
		    },          
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 查看
            view(index,row){
                this.viewdetail = true;
                this.taskInfo = row;
                this.taskInfo.taskJgType = row.taskJgType.split(',');
                //this.showInformation(index,row);
            },
        }
    })
</script>
</body>
</html>